package net.hxz.modules.services.impl;

import java.util.List;

import net.hxz.modules.dao.BannerMapper;
import net.hxz.modules.pojo.Banner;
import net.hxz.modules.services.IBannerService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BannerService implements IBannerService{

	@Autowired
	private BannerMapper bannerMapper;
	
	@Override
	public List<Banner> list() {
		return bannerMapper.list();
	}

	@Override
	public int count() {
		return bannerMapper.count();
	}

	@Override
	public int add(Banner banner) {
		return bannerMapper.insert(banner);
	}

	@Override
	public int mod(Banner banner) {
		return bannerMapper.update(banner);
	}

	@Override
	public int del(long bannerId) {
		return bannerMapper.delete(bannerId);
	}

}
